package com.zby.simulationHibernate.util.exception;

/**
 * Created By zby on 11:19 2019/1/28
 * 反射找不到类属性
 */

public class PropertyNotFoundException extends GenericException {

    // 持久类
    private Class persistentClass;
    //属性名称
    private String propertyName;
    //持久化对象是否有值
    private boolean wasSetter;
    private String message;
    private Throwable throwable;

    public PropertyNotFoundException(String message, Throwable throwable, Class persistentClass) {
        super(message, throwable);
        this.persistentClass = persistentClass;
    }

    public PropertyNotFoundException(String message, Throwable throwable, Class persistentClass, String propertyName, boolean wasSetter) {
        this(message, throwable, persistentClass);
        this.propertyName = propertyName;
        this.wasSetter = wasSetter;
    }

    @Override
    public String getMessage() {
        return super.getMessage();
    }

}
